home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Libraries / Aidan's Class Libraries / Source / Layout Classes / Outline.cpp < prev    next >
Encoding:
Text File  |  1997-07-20  |  694 b   |  36 lines  |  [TEXT/CWIE]

  1. //Copyright (c) 1997 Aidan Cully
  2. //All rights reserved
  3.  
  4. #include "CLOutline.h"
  5.  
  6. TOutline::TOutline( TLayoutBranch *super, TLayoutLeaf *child ):
  7.     TLayoutBranch( super ),
  8.     mContent( child )
  9. {
  10. }
  11.  
  12. void TOutline::DrawSelf( TDrawSlate *gr )
  13. {
  14.     PenState curPen;
  15.  
  16.     ::GetPenState( &curPen );
  17.     ::PenNormal();
  18.     ::PenSize( 3, 3 );
  19.     ::FrameRoundRect( &mContentRect, 14, 14 );
  20.     ::SetPenState( &curPen );
  21.     ((TOutline*)mContent)->DrawSelf( gr );
  22. }
  23.  
  24. void TOutline::BuildChildren()
  25. {
  26.     Rect chRect= mContentRect;
  27.  
  28.     ::InsetRect( &chRect, 4, 4 );
  29.     mContent->SetParent( this );
  30.     AddChild( mContent, chRect, 0 );
  31. }
  32.  
  33. void TOutline::CalcMouseMove( Point pt, RgnHandle rgn )
  34. {
  35.     TLayoutBranch::CalcMouseMove( pt, rgn );
  36. }